from django.shortcuts import render

from .models import Article
# Create your views here.
def home_page(request):
	return render(request, 'blog/home.html')


def blog(request):
	articles = Article.objects.all()
	return render(request, 'blog/blog.html', {"articles": articles})


def article(request, article_id):
	articles = Article.objects.all()
	article = Article.objects.get(id=article_id)
	# content = article.content
	return render(request, 'blog/blog.html', {"article": article, "articles": articles})